<script setup lang="ts">
  import { toRefs } from 'vue';
  interface CommunityItemProps {
    name: string;
    id?: string | number;
    path?: string;
    isSelected: boolean;
    height: number | string;
  }

  const props = withDefaults(defineProps<CommunityItemProps>(), {
    name: '推荐圈子',
    isSelected: false,
    height: 44,
  });
  const { name, isSelected, height } = toRefs(props);
</script>

<template>
  <div class="w-full c-nav-list-item cursor-pointer">
    <div
      :style="{ height: height + 'px' }"
      :class="{ 'item-active': isSelected }"
      class="w-full flex justify-center px-[12px] text-[rgba(0,0,0,0.5)] font-[500] rounded-[4px] items-center mb-[2px] transition-colors duration-200"
    >
      {{ name }}
    </div>
  </div>
</template>

<style scoped>
  .item-active {
    /* @apply ; */
    color: #5f70ff !important;
    background-color: rgba(95, 112, 255, 0.1);
  }

  .c-nav-list-item:hover > a {
    color: #5f70ff !important;
    background-color: rgba(95, 112, 255, 0.1);
  }
</style>
